﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.gxjdWebSite
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    public class Map_PortalArticle : EntityMapping<DB_Model.gxjdWebSite.PortalArticle>
    {
        public Map_PortalArticle()
        {
            Property(x => x.ArtContent, map =>
            {
                map.Length(2000000000);
            });

            Property(x => x.ArtDate, map =>
            {
            });

            Property(x => x.ArtIsHot, map =>
            {
            });

            Property(x => x.ArtIsNew, map =>
            {
            });

            Property(x => x.ArtIsShow, map =>
            {
            });

            Property(x => x.ArtIsTop, map =>
            {
            });

            Property(x => x.ArtTitle, map =>
            {
                map.Length(2000);
            });

            Property(x => x.ArtTypeCode, map =>
            {
                map.Length(40);
            });

            Property(x => x.ArtTypeName, map =>
            {
                map.Length(40);
            });

            Property(x => x.SpDate, map =>
            {
            });

            Property(x => x.SpDescribe, map =>
            {
                map.Length(2000000000);
            });

            Property(x => x.SpFlag, map =>
            {
            });

            Property(x => x.BidContent, map =>
            {
                map.Length(40);
            });

            Property(x => x.BidType, map =>
            {
                map.Length(40);
            });

            ManyToOne(x => x.OpUser, map =>
            {
                map.Column("OpUserId");
            });

            ManyToOne(x => x.SpUser, map =>
            {
                map.Column("SpUserId");
            });

            ManyToOne(x => x.Project, map =>
            {
                map.Column("ProjectId");
            });
            
        }
    }
}
